package com.iweb.manager.controller;


import com.iweb.manager.dao.ManagerMapper;
import com.iweb.manager.model.managers;
import com.iweb.manager.service.ManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/manager")
public class ManagerController {

    @Autowired
    ManagerService managerService;

    @GetMapping
    public String selectOne(@RequestParam String username,@RequestParam String password) {
        System.out.println(username+"  "+password);
        managers manager = managerService.selectOne(username, password);
        if (manager != null) {
            return "登陆成功";
        } else {
            return "Manager not found";
        }
    }


}
